'''
Created on 30/04/2009

@author: defo
'''

from PyQt4 import QtGui
from PyQt4 import QtCore
import sys


if __name__ == "__main__":
    pass


class CrossMatesApp(QtGui.QApplication):
    '''
    Crossmates main application
    '''
    def __init__(self, argv):
        QtGui.QApplication.__init__(self, argv)
        from lib.qtreactor import qt4reactor
        qt4reactor.install()
        from twisted.internet import reactor
        reactor.callLater(1, self.show_message)
        
    def show_message(self):
        QtGui.QMessageBox.warning(None, "Hola", "Hola")
        


#===============================================================================
# Testing
#===============================================================================
def main(argv = sys.argv):
    app = CrossMatesApp(argv)
    win = QtGui.QWidget()
    win.show()
    from twisted.internet import reactor
    reactor.run()
    #return app.exec_()


if __name__ == '__main__':
    sys.exit(main())